<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>机器二维码管理</title>
		<link rel="stylesheet" type="text/css" href="css/jqgl2-1.css"/>
	</head>
	<body>
		<div class="main_content">
			<div class="con_left">
				<div class="l-box ">
					<a href="jqgl.html">机器管理</a>
				</div>
				<div class="l-box in">
					<a href="jqgl2.html">机器二维码管理</a>
				</div>
			</div>	
			<div class="con_right bottom fl">
				<header>批量添加设备二维码</header>
				<form action="" method="post">
					<div class="info-con">
						<p>批量添加数：</p><input type="text" name="" id="" value="" maxlength="2">
						<span style="display: none;color: red;">*</span>
						<span style="display: none;color: red;">必须为正整数</span>
						<input type="submit" class="queding" value="确定"/>
						<button type="button" class="fanhui" onclick="javascript:window.location.href='jqgl2.html'">返回</button>
					</div>
				</form>
			</div>
		</div>
		<script src="js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/index.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
				$('input:submit').on('click',function(){
					var r = /^[0-9]*[1-9][0-9]*$/; 
					var val = $.trim($(':text').val());
					if(!val){
						$(':text').nextAll().eq(0).css('display','inline-block');
						return false;
					}else if(!$.isNumeric(val) || val<=0){
						$(':text').nextAll().eq(1).css('display','inline-block');					
						return false;
					}else if(!r.test(val)){
						$(':text').nextAll().eq(1).css('display','inline-block');					
						return false;
					}
					return true;
				})
			})
		</script>
	</body>
</html>
